package com.agileboot.attendance.domain.order.command;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.Date;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import lombok.Data;

/**
 * 添加订单命令
 *
 * @author agileboot
 */
@Data
@ApiModel("添加订单命令")
public class AddOrderCommand {

    @ApiModelProperty(value = "订单编码", required = true)
    @NotBlank(message = "订单编码不能为空")
    private String orderCode;

    @ApiModelProperty(value = "项目ID", required = true)
    @NotNull(message = "项目ID不能为空")
    private Long projectId;

    @ApiModelProperty(value = "供应商ID", required = true)
    @NotNull(message = "供应商ID不能为空")
    private Long supplierId;

    @ApiModelProperty(value = "开始日期", required = true)
    @NotNull(message = "开始日期不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date startDate;

    @ApiModelProperty("结束日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date endDate;

    @ApiModelProperty(value = "结算周期", required = true)
    @NotBlank(message = "结算周期不能为空")
    private String settlementCycle;

    @ApiModelProperty("状态")
    private String status;

    @ApiModelProperty(value = "订单金额", required = true)
    @NotNull(message = "订单金额不能为空")
    private BigDecimal totalAmount;

    @ApiModelProperty("备注")
    private String remark;
} 